#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'libb@anchent.com'


# data = input()
# data = 'I am a boy'
# print(data.split())
# print(data.split()[::-1])
# print(' '.join(data.split()[::-1]))


# 2.给定n个字符串，请对n个字符串按照字典序排列。
#
# n = input()
# a = []
# for i in range(int(n)):
#     a.append(input())
# a.sort()
# for i in range(int(n)):
#     print(a[i], end='\n')

# a = int(input())
# print(bin(a).find('1'))

def fib(n):
    a, b = 0, 1
    for _ in range(n):
        a, b = b, a + b
        print('a:{},b:{}'.format(a, b))
        yield a


def main():
    print(fib(20))
    for val in fib(20):
        print(val)


import os
import time


def mains():
    content = '北京欢迎你为你开天辟地…………'
    while True:
        # 清理屏幕上的输出
        os.system('cls')  # os.system('clear')
        print(content)
        # 休眠200毫秒
        time.sleep(0.2)
        content = content[1:] + content[0]


def foo():
    global a
    a = 200
    print(a)  # 200


if __name__ == '__main__':
    a = 100
    foo()
    print(a)
    # s1 = 'hello, world!'
    # s2 = "hello, world!"
    # # 以三个双引号或单引号开头的字符串可以折行
    # s3 = """
    # hello,
    # world!
    # """
    # print(s1, s2, s3, end='')
    s1 = '\'hello, world!\''
    s2 = '\n\\hello, world!\\\n'
    print(s1, s2, end='')
    s3 = r'\'hello, world!\''
    s4 = r'\n\\hello, world!\\\n'
    print(s3, s4, end='')
    a, b = 5, 10
    print(f'\n{a} * {b} = {a * b}')
    list1 = ['orange', 'apple', 'zoo', 'internationalization', 'blueberry']
    list4 = sorted(list1, key=len)
    # main()
    scores = {'骆昊': 95, '白元芳': 78, '狄仁杰': 82}
    for key in scores:
        print(f'{key}: {scores[key]}')
    for k, v in scores.items():
        print(f'{k}: {v}')
    mains()